<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>任务列表</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<!-- Add by Kravis Liu 2014.09.22 -->
		<link rel="stylesheet" href="/css/base.css" />
		<link rel="stylesheet" href="/css/list2.css" />
		<script src="/js/jquery-1.11.1.min.js"></script>

	</head>
	<body>
		<div id="page">
			<div id="header">
				<h4>后台管理</h4>
			</div>

			<table width="98%" align="center" border="1" cellpadding="0" cellspacing="0">
				<tbody id="add_point">
					<tr>
						<td><div align="center">任务标题</div></td>
						<td><div align="center">发布者</div></td>
						<td><div align="center">截至时间</div></td>
						<td><div align="center">是否推荐</div></td>
						<td><div align="center">是否限制</div></td>
						<td><div align="center">操作</div></td>
					</tr>
					<% if (Tasks){ %>
					<%  Tasks.forEach(function (task){ %>	
					<tr id="<%= task.id%>">
						<td><div align="center"><%= task.get('taskTitle') %></div></td>
						<td><div align="center"><%= task.get('uploadUser') %></div></td>
						<td><div align="center"><%= task.get('endTime') %></div></td>
						<%if (task.get('recommend') == "1"){%>
						<td><div align="center">是</div></td>
						<%} else {%>
						<td><div align="center">否</div></td>
						<%}%>
						<%if (task.get('limited') == "0"){%>
						<td><div align="center">否</div></td>
						<%} else {%>
						<td><div align="center">是</div></td>
						<%}%>
						<td><div align="center"><a href="/app/orderList?taskId=<%= task.id %>" >查看任务订单</a></div></td>
					</tr>
					<% })} %>  
				</tbody>
			</table>
			<p>&nbsp;</p>
			
			<div id="footer">
				<a style="float:right;margin:5px" href="/logout">退出</a>
				<a style="float:right;margin:5px" href="/app/index">主页</a>
				<% if(next != 0){ %>
					<a style="float:right;margin:5px" href="/app/orderTaskList?page=<%=next%>">下一页</a>
				<%}%>					
				<% if(previous >= 0){ %>
					<a style="float:right;margin:5px" href="/app/orderTaskList?page=<%=previous%>">上一页</a>
				<%}%>				
			</div>
		</div>
	</body>
</html>
